package sany.iec.config;

import com.serotonin.modbus4j.ModbusSlaveSet;
import com.serotonin.modbus4j.ip.tcp.TcpSlave;
import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author : 托马斯
 * @Date : 2025/7/3 10:26
 * @Description :
 */
@Configuration
@Getter
public class ModbusSVG01Server {

    @Value("${modbus.svg01.port}")
    private int port;


    @Bean("modbus-svg01")
    public ModbusSlaveSet modbusSalve() {
        return new TcpSlave(port, false);
    }

}
